.listing {
  display: flex;
  flex-direction: column;
  box-shadow: var(--ListingCard_shadow);
  border-radius: 4px;
  transition: box-shadow 100ms ease;
  cursor: pointer;

  &:hover {
    box-shadow: 0 6px 9px 0 rgba(0, 0, 0, 0.1);
  }
}

.squareWrapper {
  display: block;
  position: relative;
  width: 100%;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* Firefox doesn't support image aspect ratio inside flexbox */
.aspectWrapper {
  padding-bottom: 100%;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.noImageContainer,
.thumbnail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.noImageContainer,
.noImageWrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.noImageText,
.noImageLink {
  color: var(--ListingCard_noImageText);
  font-size: var(--ListingCard_fontSize);
  line-height: var(--ListingCard_lineHeight);
  font-weight: var(--ListingCard_fontWeightSemibold);
}

.noImageLink {
  font-weight: 600;

  & svg {
    stroke: var(--ListingCard_noImageText);
    height: 10px;
    stroke-width: 4px;
  }

  &:hover,
  &:hover svg {
    color: var(--ListingCard_colorTitleHover);
    stroke: var(--ListingCard_colorTitleHover);
  }
}

.info {
  display: flex;
  flex-direction: column;
  position: relative;
  flex-grow: 1;
  background-color: var(--ListingCard_colorBackground);
  padding: var(--ListingCard_spacingVertical) var(--ListingCard_spacingHorizontal);
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.avatarPosition {
  display: block;
  position: absolute;
  right: var(--ListingCard_spacingHorizontal);
  top: calc(var(--ListingCard_avatarSize) / -2);
  width: var(--ListingCard_avatarSize);
  height: var(--ListingCard_avatarSize);
  border-radius: calc(var(--ListingCard_avatarSize) / 2);
  transition: box-shadow 100ms ease;

  &:hover {
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  }
}

.title {
  flex-grow: 1;
  margin-right: var(--ListingCard_avatarSize);
  margin-bottom: var(--ListingCard_spacingVertical);
  font-size: var(--ListingCard_fontSizeTitle);
  line-height: var(--ListingCard_lineHeightTitle);
  color: var(--ListingCard_colorTitle);
  font-weight: var(--ListingCard_fontWeightMedium);

  &:hover {
    color: var(--ListingCard_colorTitleHover);
  }
}

.avatarSpacer {
  float: right;
  width: var(--ListingCard_spacingAvatar);
  height: var(--ListingCard_lineHeightTitle);
}

.footer {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.orderTypeWrapper {
  flex-basis: 67%;
  font-size: var(--ListingCard_fontSizePrice);
  font-weight: var(--ListingCard_fontWeightMedium);
  line-height: 1em;
  flex-grow: 1;
}

.price {
  float: left;
  margin-right: var(--ListingCard_textSpacing);
}

.per {
  float: left;
  font-size: var(--ListingCard_fontSize);
  font-weight: var(--ListingCard_fontWeightMedium);
  line-height: 1em;
  padding-top: 5px;
}

.distance {
  flex-basis: 33%;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  font-size: var(--ListingCard_fontSizeDistance);
  line-height: 1em;
  font-weight: var(--ListingCard_fontWeightMedium);
  letter-spacing: var(--ListingCard_letterSpacing);
  color: var(--ListingCard_colorDistance);
}

.distanceIcon {
  margin-right: var(--ListingCard_textSpacing);
  height: 14px;
}
